﻿using System;
using System.Collections.Generic;
using System.Text;
using T.FAS.Runtime.Base.Entity;
using T.FAS.Runtime.Metadata.Entity;

namespace T.FAS.Runtime.DataAccess.SPI
{
    public interface ISaveService<T> : IDataAccessAtion where T : class
    {
        /// <summary>
        /// 保存CDO数据
        /// </summary>
        /// <param name="metadata">元数据</param>
        /// <param name="commonResultObject">通用结果对象</param>
        TResult SaveData(T metadata, TRecord data, Dictionary<string, object> exrParams = null);


        /// <summary>
        /// 保存指定对象的数据
        /// </summary>
        /// <param name="metadata">元数据</param>
        /// <param name="nodeId">节点ID</param>
        /// <param name="commonResultObject">通用结果对象</param>
        TResult SaveData(T metadata, string nodeId, TRecord data, Dictionary<string, object> exrParams = null);       
    }
}
